package com.rein.spring.ioc._03_scan;

import com.rein.spring.ioc._03_scan.config.ScanConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Application {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ScanConfig.class);
        System.out.println("-------> IOC容器加载完毕......");

        String[] allBeans = applicationContext.getBeanDefinitionNames();
        for (String beanName : allBeans) {
            System.out.println(beanName);
        }
    }
}
